﻿
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using LunarPhase.Model;

namespace LunarPhase.Test
{
    
    
    /// <summary>
    ///This is a test class for PhaseCalculatorResultTest and is intended
    ///to contain all PhaseCalculatorResultTest Unit Tests
    ///</summary>
    [TestClass()]
    public class PhaseCalculatorResultTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for PhaseCalculatorResult Constructor
        ///</summary>
        [TestMethod()]
        public void PhaseCalculatorResultConstructorTest()
        {
            PhaseCalculatorResult target = new PhaseCalculatorResult();
            Assert.IsNotNull(target);
        }

        /// <summary>
        ///A test for AgeDays
        ///</summary>
        [TestMethod()]
        public void AgeDaysTest()
        {
            PhaseCalculatorResult target = new PhaseCalculatorResult(); 
            double expected = 2; 
            double actual;
            target.AgeDays = expected;
            actual = target.AgeDays;
            Assert.AreEqual(expected, actual);
            
        }

        /// <summary>
        ///A test for Constellation
        ///</summary>
        [TestMethod()]
        public void ConstellationTest()
        {
            PhaseCalculatorResult target = new PhaseCalculatorResult();
            Zodiac expected = Zodiac.Aries;
            Zodiac actual;
            target.Sign = expected;
            actual = target.Sign;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Distance
        ///</summary>
        [TestMethod()]
        public void DistanceTest()
        {
            PhaseCalculatorResult target = new PhaseCalculatorResult(); 
            double expected = 21.1; 
            double actual;
            target.Distance = expected;
            actual = target.Distance;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Latitude
        ///</summary>
        [TestMethod()]
        public void LatitudeTest()
        {
            PhaseCalculatorResult target = new PhaseCalculatorResult(); 
            double expected = 12.2;
            double actual;
            target.Latitude = expected;
            actual = target.Latitude;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Longitude
        ///</summary>
        [TestMethod()]
        public void LongitudeTest()
        {
            PhaseCalculatorResult target = new PhaseCalculatorResult(); 
            double expected = 0.12;
            double actual;
            target.Longitude = expected;
            actual = target.Longitude;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Phase
        ///</summary>
        [TestMethod()]
        public void PhaseTest()
        {
            PhaseCalculatorResult target = new PhaseCalculatorResult();
            Model.LunarPhase expected = Model.LunarPhase.FirstQuarter;
            Model.LunarPhase actual;
            target.Phase = expected;
            actual = target.Phase;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        /// A test for ToString
        /// </summary>
        [TestMethod()]
        public void ToStringMustBePhaseNameTest()
        {
            PhaseCalculatorResult target = new PhaseCalculatorResult();
            var expected = Model.LunarPhase.LastQuarter.ToString();
            target.Phase = Model.LunarPhase.LastQuarter;
            Assert.AreEqual(expected, target.ToString());
        }
    }
}
